<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <<title>MyGoToSchool</title>
    <script src="js/vue.js"></script>
    <script src="js/axios.min.js"></script>
    <link rel="stylesheet" href="css/bootstarp.min.css"/>
</head>
<body>
<div id="app">
    <table class="table table-hover">
        <caption>腾讯网</caption>
        <thead>
        <tr>
            <th>编号</th>
            <th>名字</th>
            <th>年龄</th>
            <th>入职时间</th>
            <th>离职时间</th>
        </tr>
        </thead>
        <tbody>
        <tr v-for="o in msg">
            <td>{{o.id}}</td>
            <td>{{o.name}}</td>
            <td>{{o.age}}</td>
            <td>{{o.hiretime}}</td>
            <td>{{o.time}}</td>
        </tr>
        </tbody>
    </table>
</div>
</body>
<script>
    new Vue({
        el: "#app",
        data:{
            msg: "hi vue"
        },
        mounted() {
            axios({
                method: "post",
                url: "http://localhost:8081/stu/list/10"
            })
                .then(
                    res =>{
                        this.msg = res.data
                        //console.log( res.data )
                    }
                )
        }
    })
</script>
</html>
